
<?php 
if($mode== "ADD"){

	?>
<div class="heading-buttons">
	<h3 class="glyphicons charts">
		<i></i> Category Management
	</h3>



</div>
<div class="separator"></div>




<div class="widget widget-2 widget-body-white finances_summary">
	<div class="widget-head">
		<h4 class="heading glyphicons charts">
			<i></i> Add New Category
		</h4>
		<span class="pull-right">
		<a
				href="<?= base_url();?>secure/category_tree/management/show">
				
					<span class="btn btn-inverse margin-right"><i class="icon-plus-sign icon-white"></i> Back to List </span>
			</a>
			
		</span>
		
	</div>
	<div class="widget-body">
		<div class="row-fluid">
			<form name="add_category" method="post"
				action="<?= base_url();?>secure/category_tree/management/insert">

				<?php
								$this->session->flashdata('message'); {
									$msg = $this->session->flashdata('message');
									echo '<font color="red">' . $msg . '</font>';
								}
								?>


				<fieldset>
				
				<table width="100%" cellpadding="4" cellspacing="4">
						<tr>
							
						</tr>
						<tr>
							<td class="table-no-broder">Title</td>
							<td class="table-no-broder"><input class="span8" type="text"
								name="title" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Url</td>
							<td class="table-no-broder"><input class="span8" type="text"
							name="url" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Title</td>
							<td class="table-no-broder"><input class="span8"
							type="text" name="meta_title"
							/></td>
							<td class="table-no-broder"></td>


						</tr>

						<tr>
							<td class="table-no-broder">Meta Keyword</td>
							<td class="table-no-broder"><input class="span8" type="text"
							name="meta_keyword"
							/></td>
							<td class="table-no-broder"></td>


						</tr>

						<tr>
							<td class="table-no-broder">Meta Description</td>
							<td class="table-no-broder"><textarea class="span8" name="meta_description" rows=5>
							
						</textarea></td>
							<td class="table-no-broder"></td>


						</tr>


						<tr>

							<td class="table-no-broder"></td>
							<td class="table-no-broder"><label> 
							
							<!-- <input type="hidden" name="parent_id" value="<?= $parent_id;?>">  -->
							<input type="submit"
									class="btn small" name="add_category_submit" value="Add Category" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"  />
							</label>
							</td>
							<td></td>
						</tr>
					</table>
				
				
				
				</fieldset>

			</form>


		</div>
	</div>
</div>
<?php }?>
<?php 
if($mode=="EDIT"){
	?>
<div class="heading-buttons">
	<h3 class="glyphicons charts">
		<i></i> Category Management
	</h3>



</div>
<div class="separator"></div>




<div class="widget widget-2 widget-body-white finances_summary">
	<div class="widget-head">
		<h4 class="heading glyphicons charts">
			<i></i> Edit Category
		</h4>
		<span class="pull-right">
		<a
				href="<?= base_url();?>secure/category_tree/management/show">
				
					<span class="btn btn-inverse margin-right"><i class="icon-plus-sign icon-white"></i> Back to List </span>
			</a>
			
		</span>
	</div>
	<div class="widget-body">
		<div class="row-fluid">
			<form name="add_category" method="post"
				action="<?= base_url();?>secure/category_tree/management/update">

				<?php
								$this->session->flashdata('message'); {
									$msg = $this->session->flashdata('message');
									echo '<font color="red">' . $msg . '</font>';
								}
								?>

				<fieldset>


					<table width="100%" cellpadding="4" cellspacing="4">
						<tr>
							
						</tr>
						<tr>
							<td class="table-no-broder">Title</td>
							<td class="table-no-broder"><input class="span8" type="text"
								name="title" value="<?= $category['info']->name;?>" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Url</td>
							<td class="table-no-broder"><input class="span8" type="text"
							name="url" value="<?= $category['info']->url;?>" /></td>
							<td class="table-no-broder"></td>


						</tr>
						<tr>
							<td class="table-no-broder">Meta Title</td>
							<td class="table-no-broder"><input class="span8"
							type="text" name="meta_title"
							value="<?= $category['info']->meta_title;?>" /></td>
							<td class="table-no-broder"></td>


						</tr>

						<tr>
							<td class="table-no-broder">Meta Keyword</td>
							<td class="table-no-broder"><input class="span8" type="text"
							name="meta_keyword"
							value="<?= $category['info']->meta_keyword;?>" /></td>
							<td class="table-no-broder"></td>


						</tr>

						<tr>
							<td class="table-no-broder">Meta Description</td>
							<td class="table-no-broder"><textarea class="span8" name="meta_description" rows=5>
							<?= $category['info']->meta_description;?>
						</textarea></td>
							<td class="table-no-broder"></td>


						</tr>


						<tr>

							<td class="table-no-broder"></td>
							<td class="table-no-broder"><label>
							<input type="hidden" name="id" value="<?= $id;?>">
							 <input type="submit"
									class="btn small" name="verify" value="Update" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');" />
							</label>
							</td>
							<td></td>
						</tr>
					</table>

</fieldset>

			</form>


		</div>
	</div>
</div>

<?php }?>



